<%-- 
    Document   : CustMakeReservation
    Created on : Sep 29, 2011, 10:20:20 AM
    Author     : Belinda
--%>

<%@page import="EntityState.ReservableUnitState"%>
<%@page import="java.util.ArrayList, java.util.List, BusinessLogic.Constants"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<html>
    <!-- InstanceBegin template="/Templates/FdSageLoggedOn.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <!-- InstanceBeginEditable name="doctitle" -->
        <title>Make Reservation</title>
        <!-- InstanceEndEditable -->
        <script language="javascript" type="text/javascript" src="../TransactWeb/js/jquery-1.6.4.min.js"></script>
        <script type="text/javascript" src="../TransactWeb/js/fieldsetCollapse.js"></script>
        <script type="text/javascript" src="../TransactWeb/js/tcubmenu.js"></script>
        <script type="text/javascript" src="../TransactWeb/js/accordion.js"></script>
        <script type="text/javascript" src="../TransactWeb/js/scroller.js"></script>
        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/tcubaccd.css" />
        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/promotion.css" />
        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/templatestyle.css" />
        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/tcubeadmin.css" />
        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/gridsys.css" />
        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/reset1.css" />
        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/cm.css" />
        <!-- InstanceBeginEditable name="head" -->
        <!-- InstanceEndEditable -->
        <link href="../TransactWeb/css/gridsys.css" rel="stylesheet" type="text/css" />
        <link href="../TransactWeb/css/templatestyle.css" rel="stylesheet" type="text/css" />
    </head>

    <body>
        <!-- InstanceBeginRepeat name="Header" --><!-- InstanceBeginRepeatEntry -->
        <div id="header_bg">
            <div class="container_12" id="lang_bar">
                <div class="grid_6 push_5" id="lang">
                    <table width="480" border="0">
                        <tr>
                            <td width="30">Register</td>
                            <td width="50">Contact Us</td>
                            <td width="40">SiteMap</td>
                            <td width="200"> Language  :  English | Bahasa Indonesia | 简体中文 </td>

                        </tr>
                    </table>
                </div>
            </div>
            <div class="container_12"> 
                <div class="grid_3 push_3 header_menu">About.</div>
                <div class="grid_2 push_2 header_menu">Browse.</div>
                <div class="grid_2 push_2 header_menu" id="plan">Plan.</div>
                <div class="grid_3 push_2 header_menu">Socialize.</div>
                <div class="clear"></div>

                <div class="grid_1 push_3" id="header_sbabout">FoodSage<br />Singapore</div>
                <div class="grid_2 push_3" id="header_sbbrowse">Restaurant List <br />
                    Places of Attraction</div>
                <div class="grid_2 push_2" id="header_sbplan">Your Itinerary</div>
                <div class="grid_2 push_1" id="header_sbsocial">mySage &nbsp; &nbsp;Classified<br /> Mobile Application</div>
                <div class="clear"></div>
                <div class="grid_2 push_10 test" id="cart"><img src="../TransactWeb/img/template/cart.png" width="18" height="15" alt="cart" />Cart 2</div>

            </div>

        </div>
        <div id="login">
            <div class="container_12">
                <div class="grid_4" id="welcome"> Welcome User!</div>

            </div>
        </div> 
        <!-- InstanceEndRepeatEntry --><!-- InstanceEndRepeat -->
        <!-- InstanceBeginEditable name="Content" --><div class="container_12">
            <div class="grid_4 restdesc">
                <ul id="accordion">
                    <li>

                        <span class="itplan"><img src="../TransactWeb/img/cm/airplane.png" width="50" height="50" alt="travel" /> &nbsp;Itinerary Planner<br /><br />
                            <span style="font-size:12px;"> Singapore, September 2011<br />
                                September 20 - September 22</span>
                        </span>

                    </li>
                    <li>
                        <a class="heading">Day 1 - 20 September</a>
                        <ul>
                            <li><a href="#"><b>Shangri-La The Line</b><br />Category : Buffet<br /> Type : F&amp;B    </a><br /> 
                                <a href="#" class="reserve">Make Reservation Now</a></li>
                            <li><a href="#"><b>Chuan Yang Ji Mutton Soup Steamboat</b><br />Category : Steamboat<br /> Type : F&amp;B    </a><br /> <a href="#" class="reserve">Make Reservation Now</a></li>
                            <li><a href="#"><b>Wild Olives</b><br />Category : Italian<br /> Type : F&amp;B   </a><br /> <a href="#" class="reserve">Make Reservation Now</a></li>
                        </ul>
                    </li>
                    <li>
                        <a class="heading">Day 2 - 21 September</a>
                        <ul>
                            <li><a href="#"><b>Betel Box Living Bistro</b><br />Category : Fusion <br /> Type : F&amp;B   </a><br /> 
                                <a href="#" class="reserve">Make Reservation Now</a></li>
                            <li><a href="#"><b>Ocean Kingdom Live Seafood Restaurant</b><br />Category : Seafood<br /> Type : F&amp;B    </a><br /> 
                                <a href="#" class="reserve">Make Reservation Now</a></li>

                        </ul>
                    </li>
                    <li>
                        <a class="heading">Day 3 - 22 September</a>
                        <ul>
                            <li><a href="#"><b>The Mexican Taco Bar</b><br />Category : Latin America<br /> Type : F&amp;B    </a><br /> <a href="#" class="reserve">Make Reservation Now</a></li>
                            <li><a href="#"><b>The Ballet Season</b><br />Category : Performance<br /> Type : Ticketing   </a><br /> 
                                <a href="#" class="ticket">Buy Tickets Now</a></li>
                            <li><a href="#"><b>Elton John &amp; Band Greatest Hits Tour</b><br />
                                    Category : Concert<br /> 
                                    Type : Ticketing</a><br /> <a href="#" class="ticket">Buy Tickets Now</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
            <div class="reservationline">
                <div class="grid_6 reservationtype">Integrated Online Ticketing Reservation System</div>
            </div>

            <div class="grid_8">
                <div class="grid_8 reservetbls">
                    <table width="600" border="1">
                        <tr>
                            <td width="420" class="venue">The Line Restaurant @ Shangri-La Hotel</td>
                        </tr>
                        <tr>
                            <td class="venue">Address : 22 Orange Grove Road, Basement Shangri-la Hotel, Singapore 486720<br />
                            </td>
                        </tr>
                        <tr>
                            <td class="venue">Telephone : (65) 62847710</td>
                        </tr>
                        <tr>
                            <td class="venue">Email : Line@Shangri-La.com.sg</td>
                        </tr>
                    </table>
                </div>
                <br /><br />
                <div class="grid_8 reservemenus">

                    <!-- If there are menus selected, show. -->
                    <table width="580" border="1">
                        <tr>
                            <td width="363">Menu(s) Selected</td>
                            <td width="221">Quantity</td>
                        </tr>
                        <tr>
                            <td>The Magic-8 Set</td>
                            <td>3</td>
                        </tr>
                        <tr>
                            <td>The Lunch Set For 2</td>
                            <td>1</td>
                        </tr>
                    </table>
                    <!-- End Show Menu -->
                </div>
                <div class="grid_8 reservetbls">
                    <form action="ViewCart" method="POST">
                        <table width="600" border="1">
                            <tr>
                                <td>Customer Name : </td>
                                <td><input name="name" id="name" type="text" /></td>
                            </tr>
                            <tr>
                                <td>Contact No. :</td>
                                <td>+
                                    <input size="4" type="text" value="" id="countryCode" name="countryCode" />
                                    -
                                    <input size="12" type="text" value="" id="phone" name="phone" /></td>
                            </tr>
                        </table>
                </div>
                <div class="grid_8 reservetbls">
                    <!-- Repeatable Region for multiple reservation -->
                    <table width="600" border="1">
                        <tr>
                            <td>Reservation Size :</td>
                            <td><input name="numOfPeople" id="numOfPeople" type="text" /></td>
                        </tr>
                        <tr>
                            <td>Date :</td>
                            <td><input name="date" id="date" type="text" /></td>
                        </tr>
                        <tr>
                            <td>Start Time :</td>
                            <td><select name="startTime" id="startTime">
                                    <option value="" selected="selected">Start Time</option>
                                    <option value="1800">1800</option>
                                    <option value="1900">1900</option>
                                    <option value="2000">2000</option>
                                    <option value="2100">2100</option>
                                </select></td>
                        </tr>
                        <tr>
                            <td>End Time :</td>
                            <td><select name="endTime" id="endTime">
                                    <option value="" selected="selected">End Time</option>
                                    <option value="1800">1800</option>
                                    <option value="1900">1900</option>
                                    <option value="2000">2000</option>
                                    <option value="2100">2100</option>
                                </select></td>
                        </tr>
                        <tr>
                            <td>Seating Area : </td>
                            <td>
                                <select name="reservableUnitID" id="reservableUnitID">

                                    <%
                                        ArrayList data = (ArrayList) request.getAttribute("data");
                                        int result = ((Integer) data.get(0)).intValue();
                                        System.out.println("result: " + result);
                                        if (result == Constants.STATUS_SUCCESSFUL) {
                                            List<ReservableUnitState> reservableUnits = (List) data.get(1);
                                            for (ReservableUnitState unit : reservableUnits) {
                                    %>

                                    <option value="<%= unit.getId()%>" ><%= unit.getName()%></option>

                                    <%      }
                                        } else {
                                    %>

                                    <option value="" >None</option>

                                    <%                                        }
                                    %>

                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2"><img src="../TransactWeb/img/reservation/floorplan.PNG" width="453" height="323" alt="floorplan" /></td>
                        </tr>
                    </table>
                </div>
                <div class="grid_8 reservetbls">
                    <!-- End Repeatable Region for multiple reservations -->
                    <table width="437" border="1">
                        <tr height="30">
                            <td width="129">Total Cost : </td>
                            <td width="292">$103.50 SGD </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <!-- If there are menus and they can purchase without reservation -->
                                <input type="submit" name="back" id="back" value="Back" /> 
                                <input type="submit" name="skip" id="skip" value="Skip" />
                                <!-- end if --> 

                                <input type="submit" name="confirm" id="confirm" value="Confirm Reservation(s)" />
                            </td>
                        </tr>
                    </table>
                </div>
                </form>
            </div>
        </div>
        <!-- InstanceEndEditable -->
        <!-- InstanceBeginRepeat name="Footer" --><!-- InstanceBeginRepeatEntry -->
        <div id="footer_bar">
            <div class="container_12">
                <div class="grid_12" id="footer">&copy; &nbsp;Copyright FoodSage</div>
            </div>
        </div>
        <!-- InstanceEndRepeatEntry --><!-- InstanceEndRepeat -->
    </body>
    <!-- InstanceEnd --></html>
